package de.dhbw.karlsruhe.picsim.model.commands.impl;

import de.dhbw.karlsruhe.picsim.model.actions.ActionFactory;
import de.dhbw.karlsruhe.picsim.model.actions.PicAction;
import de.dhbw.karlsruhe.picsim.model.commands.PicInstruction;
import de.dhbw.karlsruhe.picsim.model.cpu.PicInstructionFacade;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: goesen
 * Date: May 3, 2010
 * Time: 3:23:07 PM
 */
public class CLRWDT implements PicInstruction {
    private static final Log log = LogFactory.getLog(CLRWDT.class);

    @NotNull
    @Override
    public List<? extends PicAction> getActions(@NotNull final PicInstructionFacade pic) {
        log.debug("Watchdog Timer will be cleared");


        final ActionFactory actionFactory = pic.getActionFactory();

        return actionFactory.clearWatchDog();
    }
}
